Portable terminal device and method of controlling portable terminal device

ABSTRACT

A portable terminal device includes a vibrator configured to vibrate a housing; an analysis section configured to execute frequency analysis on an input sound from a microphone; a calculating section configured to calculate an amount of temporal change of a spectrum obtained by the analysis section for the input sound when the housing vibrates; and a control section configured to execute incoming-call control depending on the amount of temporal change calculated by the calculating section.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of InternationalApplication PCT/JP2010/073599 filed on Dec. 27, 2010 and designated theU.S., the entire contents of which are incorporated herein by reference.

FIELD

The invention relates to a portable terminal device that has a vibratorfunction and a method of controlling a portable terminal device.

BACKGROUND

Conventionally, there are portable terminal devices that indicate anincoming call to a user by vibrating a vibrator when receiving theincoming call. However, depending on a place where the portable terminaldevice is located, unpleasant sound may be generated by rumbling of thevibrator.

Accordingly, there is a technology that controls rumbling of a vibratorby measuring sound pressure levels of the vibrator under vibration andunder suspension, at the surroundings by a microphone, and comparingdifference of the sound pressure levels with a threshold value.

Also, there is a technology that determines whether cause of noise isoriginated from a vibrator, then based on a determination result,controls strength of vibration of the vibrator.

RELATED-ART DOCUMENTS Patent Document

-   [Patent document 1] Japanese Laid-open Patent Publication No.    2004-56623-   [Patent document 2] Japanese Laid-open Patent Publication No.    2004-129120

If a portable terminal device is inside of a bag or a pocket of clothes,it is often the case that a vibration of a vibrator is unnoticed. Forexample, a bag or a pocket of clothes, where a vibration of the vibratortends to be unnoticed, touches a portable terminal device on multiplesurfaces, whereas a desk or the like touches the portable terminaldevice on a single surface.

If a contacting state of a portable terminal device can be estimated, itis considered that behavior of the portable terminal device can becontrolled properly when an incoming call arrives. On the other hand, asthe conventional technologies only refer to a power of the surroundingsound as a basis for determination, the power of the sound remainsalmost unchanged if the contacting state changes, hence the contactingstate cannot be estimated.

SUMMARY

According to an embodiment of the disclosures, a portable terminaldevice includes a vibrator configured to vibrate a housing; an analysissection configured to execute frequency analysis on an input sound froma microphone; a calculating section configured to calculate an amount oftemporal change of a spectrum obtained by the analysis section for theinput sound when the housing vibrates; and a control section configuredto execute incoming-call control depending on the amount of temporalchange calculated by the calculating section.

The object and advantages of the embodiment will be realized andattained by means of the elements and combinations particularly pointedout in the claims. It is to be understood that both the foregoinggeneral description and the following detailed description are exemplaryand explanatory and are not restrictive of the invention as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example of hardware of aportable terminal device according to a first embodiment;

FIG. 2 is a block diagram illustrating an example of functions of acontrol section according to the first embodiment;

FIG. 3 is a schematic view illustrating a change of a spectrum;

FIGS. 4A-4B are schematic views for describing influences of noise;

FIGS. 5A-5B are schematic views illustrating examples of temporalchanges of spectrums;

FIG. 6 is a block diagram illustrating an example of functions ofincoming call control in an incoming-call control section;

FIGS. 7A-7B are schematic views illustrating results of vibrationadjustment of a vibrator;

FIG. 8 is a flowchart illustrating an example of a control procedure ofa portable terminal device according to the first embodiment;

FIG. 9 is a block diagram illustrating an example of functions of acontrol section according to a second embodiment;

FIG. 10 is a flowchart illustrating an example of a control procedure ofa portable terminal device according to the second embodiment;

FIG. 11 is a block diagram illustrating an example of functions of acontrol section according to a third embodiment;

FIG. 12 is a schematic view illustrating an example of a relationshipbetween amount of amplification of a ringtone and amount of temporalchange; and

FIG. 13 is a flowchart illustrating an example of a control procedure ofa portable terminal device according to the third embodiment.

DESCRIPTION OF EMBODIMENTS

In the following, embodiments will be described with reference to thedrawings.

First Embodiment

<Configuration>

FIG. 1 is a block diagram illustrating an example of hardware of aportable terminal device 1 to the first embodiment. The portableterminal device 1 includes an antenna 10, a radio section 20, a controlsection 30, a vibrator 40, a microphone 50, a loudspeaker 60, and aterminal interface section 70.

The antenna 10 sends a radio signal amplified by a sending amplifier,and receives a radio signal sent from a base station. The radio section20 applies a D/A conversion to the sending signal spread by the controlsection 30, converts it to a high frequency signal by a quadraturemodulation, and amplifies the signal by a power amplifier. The radiosection 20 amplifies the received radio signal and applies an A/Dconversion to the amplified signal to send it to the control section 30.

The control section 30 executes various baseband processing such as anaddition of error correcting codes to sending data, data modulation,spread modulation, despreading of a received signal, determination ofreceiving environment, determination of a threshold value for eachchannel signal, error correction decoding, etc. The control section 30also executes radio control such as sending/receiving of a controlsignal. Here, the baseband processing may be executed with a differentconfiguration from the control section 30.

The terminal interface section 70 executes adapter processing for data,and interface processing with a handset and an external data terminal.

<Function>

Next, functions of the portable terminal device 1 will be describedaccording to the first embodiment. FIG. 2 is a block diagramillustrating an example of functions of the control section 30 accordingto the first embodiment. As illustrated in FIG. 2, the control section30 includes a frequency analysis section 101, a spectrum-changecalculating section 102, a noise estimate section 103, and anincoming-call control section 104.

The frequency analysis section 101 obtains input sound from themicrophone 50, and executes frequency analysis on the obtained inputsound. The input sound includes vibration sound, background sound, andthe like. Frequency analysis may be executed, for example, with a knowntechnology such as fast Fourier transform (FFT) or wavelet transform.

The frequency analysis section 101 applies, for example, FFT (256points) to the input sound (8 kHz). The input sound is represented byx(n), and the input spectrum is represented by X(f). Also, the frequencyanalysis section 101 calculates a power spectrum from the input spectrumaccording to the following formula (1).

S(f)=10 log₁₀(|X(f)²|)  FORMULA 1

-   -   S(f) represents a power spectrum.

The power spectrum S(f) obtained by the frequency analysis section 101is output to the spectrum-change calculating section 102 and the noiseestimate section 103.

The spectrum-change calculating section 102 calculates an amount oftemporal change of the power spectrum from the power spectrum obtainedby the frequency analysis section 101. In the following, calculationmethods for an amount of change will be described for a case where aninfluence of noise is removed, and for a case where the influence is notremoved.

(1) Case where the Influence of Noise is Not Removed

The spectrum-change calculating section 102 calculates an amount oftemporal change of the power spectrum (called an “amount of temporalchange”, hereafter) according to the following formula (2).

Δ=1/count·Σ_(f) _(low) ^(f) ^(high() S _(t)(f)−S _(t-1)(f))  FORMULA 2

-   -   Δ: average amount of temporal change    -   t: frame number    -   f: frequency number    -   S_(t)(f): power spectrum of t frame    -   S_(t-1)(f): power spectrum of t−1 frame    -   f_(low): lower limit of the calculated frequency    -   f_(high): upper limit of the calculated frequency    -   count: the number of measured bands

For example, f_(low)=0, and f_(high)=64 (2 kHz). The spectrum-changecalculating section 102 outputs the calculated amount of temporal changeΔ to the incoming-call control section 104. Here, the average amount oftemporal change Δ is not necessarily the average, but it may be anaccumulation of temporal differences of the power spectrum.

FIG. 3 is a schematic view illustrating a change of a spectrum. A solidline illustrated in FIG. 3 represents a power spectrum S_(t)(f) at acertain time, and a dotted line represents the power spectrum S_(t-1)(f)at the certain time minus 1. By taking a difference between these powerspectrums, the spectrum-change calculating section 102 calculates theamount of temporal change of the spectrum.

(2) Case where the Influence of Noise is Removed

The spectrum-change calculating section 102 obtains a noise spectrumfrom the noise estimate section 103. The noise spectrum is obtained bythe noise estimate section 103 as follows.

The noise estimate section 103 obtains the power spectrum S(f) from thefrequency analysis section 101. The noise estimate section 103 obtainsthe power spectrum noise (f) of the noise from the power spectrum S(f)when the vibrator 40 stops, using the following formula (3). Theportable terminal device 1 can easily recognize when the vibrator 40stops because the portable terminal device 1 is controlling the vibrator40.

noise_(t)(f)=a·noise_(t-1)(f)+b·S(f)  FORMULA 3

-   -   noise(f): power spectrum of the noise    -   a, b: coefficient a+b=1 and a, b>0

The noise estimate section 103 outputs the noise power spectrumestimated using the power spectrum at a predetermined time to thespectrum-change calculating section 102.

The spectrum-change calculating section 102 calculates an amount oftemporal change of the power spectrum within a predetermined band wherenoise is removed with the noise power spectrum obtained by the noiseestimate section 103.

FIGS. 4A-4B are schematic views for describing influences of noise. FIG.4A describes a case where an amount of temporal change is calculated forthe whole range of a band. Sp1 illustrated in the FIG. 4A represents apower spectrum of noise at a certain time m, Sp2 represents a powerspectrum of the noise at the time m⁻¹, Sp3 represents a power spectrumof a vibration sound at the time m, and Sp4 represents a power spectrumof the vibration sound at the time m−1. In a band band1 illustrated inFIG. 4A, a correct control change of the spectrum of the vibration soundcannot be measured because the power of noise is high.

FIG. 4B describes a case where a range for spectrum calculation islimited to a predetermined band. In FIG. 4B, the amount of temporalchange of the spectrum is calculated within a band band2 where aninfluence of noise is small. This makes it possible to analyze only thevibration sound to improve calculation precision of the amount oftemporal change. Here, the following two ways, for example, may beconsidered as methods of obtaining a predetermined band where noise isexcluded.

Predetermined Band (First One)

The spectrum-change calculating section 102 sets the predetermined bandto a band where the noise power spectrum is below a threshold value ofnoise. Using the predetermined band, the spectrum-change calculatingsection 102 calculates the amount of temporal change of the spectrumaccording to the following formula (4).

Δ=1/count·Σ_(f) _(low) ^(f) ^(high() S _(t)(f)−S_(t-1)(f)|noise_(t)(f)<THR _(pow))  FORMULA 4

-   -   noise_(t)(f): noise power spectrum of frame t    -   THR_(pow): threshold value of noise

The threshold value of noise THR_(pow) is set to a value greater than avibration sound, which is set to an appropriate value beforehand by anexperiment or the like.

Predetermined Band (Second One)

The spectrum-change calculating section 102 sets the predetermined bandto a band where a difference of levels between the noise power spectrumand the power spectrum of the vibration sound is greater than athreshold value. Using the predetermined band, the spectrum-changecalculating section 102 calculates the amount of temporal change of thespectrum according to the following formula (6).

SNR _(f) =S _(t)(f)−noise_(t)(f)  formula (5)

Δ=1/count·Σ_(f) _(low) ^(f) ^(high() S _(t)(f)−S _(t-1)(f)|SNR _(f) >THR_(SNR))  FORMULA 6

-   -   THR_(SNR): threshold value of level(SNR)

The threshold value of SNR, THR_(SNR), is set to, for example, 6 dB(decibel), which is set to an appropriate value beforehand by anexperiment or the like.

Either one of the predetermined bands described above may be used. Thespectrum-change calculating section 102 may be set beforehand to useeither one of them, or a properly selected one is set into thespectrum-change calculating section 102. The spectrum-change calculatingsection 102 obtains the amount of temporal change of the spectrum in thepredetermined band where the influence of noise is removed, then outputsthe amount of temporal change to the incoming-call control section 104.

Also, when calculating the amount of temporal change of the spectrum,the spectrum-change calculating section 102 may use a band includingonly the oscillation frequency of the vibrator 40 and a harmonic of theoscillation frequency. This can be applied to both cases where noise isremoved, and not removed. The spectrum-change calculating section 102calculates the amount of temporal change of the spectrum, for example,if the frequency f of the formula (4) or (6) is the oscillationfrequency of the vibrator or a harmonic of the oscillation frequency.

This makes it possible to calculate the amount of temporal change of thespectrum using the minimum frequencies required.

In this case, the spectrum-change calculating section 102 obtains therotational frequency of a vibration motor of the vibrator 40 from theincoming-call control section 104.

The incoming-call control section 104 estimates a contacting state ofthe portable terminal device 1 from the amount of temporal change Δ ofthe spectrum obtained from the spectrum-change calculating section 102.Here, if the portable terminal device 1 touches a single surface on adesk or the like, the amount of temporal change is small. Also, if theportable terminal device 2 touches multiple surfaces in a bag, a pocketof clothes, or the like, the amount of temporal change is great.

FIGS. 5A-5B are schematic views illustrating examples of temporalchanges of spectrums. FIG. 5A illustrates a temporal change of aspectrum for a case where the contacting state does not change. The casewhere the contacting state does not change is, for example, a case wherethe portable terminal device 1 is placed on a single surface of a deskor the like. FIG. 5A illustrates a spectrum of a vibrator sound when theportable terminal device 1 is placed on a desk.

Sp5 illustrated in FIG. 5A represents a power spectrum at a time s, Sp6represents a power spectrum at the time s−1, and Sp7 represents a powerspectrum at the time s−2. As illustrated in FIG. 5A, it can beunderstood that if the contacting state does not change, temporal changeof the spectrum of the vibration sound is small. If the contacting statedoes not change, the vibration sound is likely to be noticed by a user.

FIG. 5B illustrates a temporal change of a spectrum for a case where thecontacting state changes. The case where the contacting state changesis, for example, a case where the portable terminal device 1 touchesmultiple surfaces in a bag, a pocket of clothes, or the like. FIG. 5Billustrates a spectrum of the vibration sound when the portable terminaldevice 1 is put in a bag.

Sp8 illustrated in FIG. 5B represents a power spectrum at a time s, Sp9represents a power spectrum at the time s−1, and Sp10 represents a powerspectrum at the time s−2. As illustrated in FIG. 5B, if the contactingstate changes, the temporal change of the spectrum of the vibrationsound becomes great. If the contacting state changes, the vibrationsound is likely to be unnoticed by a user.

Thus, it is possible for the portable terminal device 1 to estimate thecontacting state of the housing of the portable terminal device 1 basedon the amount of temporal change of the spectrum of the vibration sound.By estimating the contacting state, proper control of an incoming callcan be executed.

When receiving an incoming-call signal, the incoming-call controlsection 104 executes control of the vibrator 40 and/or a ringtone. Theincoming-call control section 104 properly controls the vibrator 40and/or the ringtone depending on a contacting state of the portableterminal device 1.

FIG. 6 is a block diagram illustrating an example of functions ofincoming call control in the incoming call control section 104. Asillustrated in FIG. 6, the incoming-call control section 104 includes avibrator control section 141 and a ringtone control section 142.

The vibrator control section 141 controls a motor (not illustrated) ofthe vibrator 40. The vibrator control section 141 controls theoscillation frequency of the vibrator 40 is set to a great value if itis estimated that the contacting state is to be changed. The vibratorcontrol section 141 controls it to be set to a predetermined oscillationfrequency if it is estimated that the contacting state is not to bechanged. The predetermined oscillation frequency is a normal oscillationfrequency or the like.

The vibrator control section 141 may adjust the vibration of thevibrator 40 to make an analysis of the vibration sound easier if thereis noise in the input sound from the microphone 5. The vibrator controlsection 141, for example, makes the vibration of the vibrator 40greater, or changes the frequency of the vibration sound. In thefollowing, these methods will be described.

Control the Oscillation Frequency (Amplitude)

The vibrator control section 141 accumulates level differences (SNR)between the power spectrum of the input sound when vibrating obtained bythe spectrum-change calculating section 102, and the power spectrum ofthe noise according to the following formula (7).

$\begin{matrix}{{SNR} = {{\sum\limits_{f = f_{low}}^{f_{high}}\; {S(f)}} - {{noise}(f)}}} & {{FORMULA}\mspace{14mu} 7}\end{matrix}$

The vibrator control section 141 executes control of a vibration motorthat has multiple weights with different radii R. For example, thevibrator control section 141 switches to a weight having a greaterradius if SNR obtained by the formula (7) is smaller than the thresholdvalue of SNR, THR_(SNR2), to make the vibration or amplitude of thevibrator 40 greater.

Also, the vibrator control section 141 executes control so that a normalweight is used if SNR obtained by the formula (7) is greater than thethreshold value of SNR, THR_(SNR2). The threshold value THR_(SNR2) isset to, for example, 3 dB, which is set to an appropriate valuebeforehand by an experiment or the like.

Thus, the vibration of the vibrator 40 is enlarged (amplitude isenlarged) if the influence of noise is great, which makes it possible toimprove calculation precision of the temporal change of a spectrum ofvibration sound.

Control Frequency

The vibrator control section 141 obtains level difference (SNR_(p))between the power spectrum of the input sound under vibration that isobtained by the spectrum-change calculating section 102, and the powerspectrum of the noise, which can be calculated with the formula (5).

The vibrator control section 141 counts cases where the obtained leveldifference SNR_(p) is smaller than the threshold value THR_(SNR3). Thismakes it possible to count the number of bands whose level difference issmall. The vibrator control section 141 controls the rotationalfrequency of the vibration motor to increase or decrease if the countedvalue is greater than the threshold value THR_(count). This makes itpossible to shift a frequency at which the peak value of the spectrum ofthe vibration sound is obtained.

FIGS. 7A-7B are schematic views illustrating results of vibrationadjustment of the vibrator 40. FIG. 7A illustrates an example of aspectrum with an enlarged amplitude. Sp11 illustrated in FIG. 7Arepresents a noise spectrum, Sp12 represents a spectrum of the vibrationsound before adjustment, and Sp13 represents a spectrum of the vibrationsound after adjustment. As illustrated in FIG. 7A, the amplitude of thevibration sound becomes great if vibrating with a weight that has agreat radius.

FIG. 7B illustrates an example of a spectrum with a shifted frequency.Sp21 illustrated in FIG. 7B represent a noise spectrum, Sp22 representsa spectrum of the vibration sound before adjustment, and Sp23 representsa spectrum of the vibration sound after adjustment. As illustrated inFIG. 7B, by increasing the rotational frequency of the vibration motor,the spectrum of the vibration sound is shifted to a higher frequency.Here, the spectrum of the vibration sound may be shifted to a lowerfrequency by decreasing the rotational frequency of the vibration motor.

By adjusting the vibration of the vibrator 40 as illustrated in FIGS.7A-7B, it is possible to improve calculation precision of the temporalchange of a spectrum for vibration sound.

Returning to FIG. 6, the ringtone control section 142 controls theringtone (incoming-call sound) to be louder if the contacting state isestimated to be changed. The ringtone control section 142 controls theringtone set beforehand to be output from the loudspeaker 60 if thecontacting state is estimated to remain unchanged.

Thus, it is possible for the portable terminal device 1 to control thevibrator and the ring tone properly based on the estimated contactingstate.

<Operation>

Next, operations of the portable terminal device 1 will be describedaccording to the first embodiment. FIG. 8 is a flowchart illustrating anexample of a control procedure of the portable terminal device 1according to the first embodiment.

At Step S101 illustrated in FIG. 8, the vibrator control section 141starts up the vibrator 40 when receiving an incoming call, or at aregular interval by a timer.

At Step S102, the frequency analysis section 101 obtains input soundincluding vibration sound from the microphone 50.

At Step S103, the frequency analysis section 101 applies a frequencyanalysis, for example, FFT or the like, to the input sound.

At Step S104, the spectrum-change calculating section 102 calculates theamount of temporal change of the spectrum. At this moment, thespectrum-change calculating section 102 may calculate the amount oftemporal change of the spectrum within the predetermined band wherenoise is removed.

At Step S105, the incoming-call control section 104 determines whetherthe amount of temporal change is below the threshold value. If it isbelow the threshold value (Step S105—YES), Step S106 is taken, if it isover the threshold value (Step S105—NO), Step S107 is taken.

At Step S106, the incoming-call control section 104 determines that thecontacting state of the portable terminal device 1 is not to be changed.

At Step S107, the incoming-call control section 104 determines that thecontacting state of the portable terminal device 1 is to be changed.

At Step S108, the incoming-call control section 104 properly controlsthe vibrator 40 and/or the ringtone when receiving an incoming call withthe estimation result of the contacting state. For example, if thecontacting state of the portable terminal device 1 is estimated to bechanged, the incoming-call control section 104 increases the rotationalfrequency of the vibration motor, or increases the ringtone. If thecontacting state of the portable terminal device 1 is determined not tobe changed, the incoming-call control section 104 rotates the vibrationmotor at the rotational frequency set beforehand, or outputs theringtone from the loudspeaker 60 with the volume set beforehand.

As above, according to the first embodiment, it is possible to controlthe vibrator 40 and the ringtone properly based on the estimatedcontacting state, which is obtained by calculating the amount oftemporal change of the spectrum to estimate the contacting state. Also,according to the first embodiment, by calculating the amount of temporalchange within the predetermined band where the influence of noise isremoved, calculation precision can be improved. Also, according to thefirst embodiment, if it is determined that the influence of noise isgreat, the vibration sound can be made easily detectable by adjustingthe vibration of the vibrator 40 to make the vibration sound loud or toshift the frequency of the vibration sound.

Second Embodiment

Next, a portable terminal device 1 will be described according to thesecond embodiment.

According to the second embodiment, determination of the contactingstate is executed when a light receiving state of the housing of theportable terminal device 1 is changed. This is because there is apossibility of a change of the contacting state if the light receivingstate changes. According to the second embodiment, the hardware of theportable terminal device 1 includes an optical sensor 201, which will bedescribed later, a memory 202, and the other hardware which is the sameas in the first embodiment.

<Function>

Next, functions of the control section 31 of the portable terminaldevice 1 will be described according to the second embodiment. FIG. 9 isa block diagram illustrating an example of functions of the controlsection 31 according to a second embodiment. As illustrated in FIG. 9,the control section 31 includes a frequency analysis section 101, aspectrum-change calculating section 102, a noise estimate section 103,an incoming-call control section 204, and a received-light-change outputsection 203. The functions illustrated in FIG. 9 are assigned the samenumeral codes as the function illustrated in FIG. 2, whose descriptionis omitted.

First, the optical sensor 201 receives light on the housing. The opticalsensor 201 measures a light receiving time u of a received light signalthat has a predetermined amount of light, to determine whether the lightreceiving time u is more than a threshold value THR_(light). Thethreshold value THR_(light) is set to, for example, 30 s, which is setto an appropriate value beforehand by an experiment or the like.

The optical sensor 201 sets a light receiving state of the housing basedon the light receiving time u. A flag designating a “bright state” ordesignating a “dark state” is set in the memory 202 to designate thelight receiving state. The memory 202 stores the flag representing thelight receiving state.

When the Light Receiving State is “Bright State”

The optical sensor 201 keeps the flag in the memory 202 unchanged if thelight receiving time u is greater than the threshold value THR_(light),or sets the flag designating “dark state” in the memory 202 if below thethreshold value THR_(light).

When the Light Receiving State is “Dark State”

The optical sensor 201 keeps the flag in the memory 202 unchanged if thelight receiving time u is below the threshold value THR_(light), or setsthe flag designating “bright state” in the memory 202 if over thethreshold value THR_(light).

If detecting a change of the light receiving state, thereceived-light-change output section 203 of the control section 31outputs a command for vibrating the vibrator 40 to the incoming-callcontrol section 204. The received-light-change output section 203 candetect a change of the light receiving state, for example, by a changeof the flag in the memory 202.

Here, the received-light-change output section 203 may hold the flag ofthe light receiving state by itself, and may obtain a light receivingtime u directly from the optical sensor 201, to detect a change in thelight receiving environment.

If receiving the command for vibrating the vibrator 40 from thereceived-light-change output section 203, the incoming-call controlsection 204 vibrates the vibrator 40, with which the control section 31starts an estimation of the contacting state. The estimation of thecontacting state is the same as in the first embodiment.

Thus, it is possible to reduce ineffective estimation of the contactingstate by starting the estimation triggered by a change of the lightreceiving state.

<Operation>

Next, operations of the portable terminal device 1 will be describedaccording to the second embodiment. FIG. 10 is a flowchart illustratingan example of a control procedure of the portable terminal device 1according to the second embodiment.

At Step S201 illustrated in FIG. 10, the received-light-change outputsection 203 determines whether the light receiving state changes. Forexample, the received-light-change output section 203 determines thatthe light receiving state changes if the flag in the memory 202 ischanged.

The following Steps S202 to S209 are the same as Steps S101 to S108illustrated in FIG. 8, whose description is omitted.

As above, according to the second embodiment, the estimate of thecontacting state can be started with a trigger of a change of the lightreceiving state, to reduce ineffective estimation of the contactingstate.

Third Embodiment

Next, a portable terminal device 1 will be described according to thethird embodiment. According to the third embodiment, incoming-callcontrol is executed in stages depending on the amount of temporal changeof the spectrum. This makes it possible to execute proper incoming-callcontrol depending on a degree of the contacting state. The hardware ofthe portable terminal device 1 in the third embodiment is the same as inthe first embodiment.

<Function>

Next, functions of the control section 32 of the portable terminaldevice 1 will be described according to the third embodiment. FIG. 11 isa block diagram illustrating an example of functions of a controlsection according to the third embodiment. As illustrated in FIG. 11,the control section 32 includes a frequency analysis section 101, aspectrum-change calculating section 102, a noise estimate section 103,and an incoming-call control section 301. The functions illustrated inFIG. 11 are assigned the same numeral codes as the functions illustratedin FIG. 2, and their description is omitted.

The incoming-call control section 301 illustrated in FIG. 11 obtains theamount of temporal change of a spectrum from the spectrum-changecalculating section 102. The incoming-call control section 301 controlsthe oscillation frequency of the vibrator 40 and the amount ofamplification of the ringtone depending on the obtained amount oftemporal change.

FIG. 12 is a schematic view illustrating an example of a relationshipbetween amount of amplification of a ringtone and amount of temporalchange. As illustrated in FIG. 12, the greater the amount of temporalchange of the spectrum is, the greater gain the ringtone is controlledto have. The incoming-call control section 301 may determine gaindepending on the amount of temporal change Δ by defining a functiong=G(Δ) illustrated in FIG. 12.

Here, g_(max) illustrated in FIG. 12 represents a maximum amount ofamplification, a threshold value THRs_(low) represents a lower-limitthreshold value of the amount of temporal change, and a threshold valueTHRs_(high) represents an upper-limit threshold value of the amount oftemporal change.

Also for the oscillation frequency of the vibrator 40, the incoming-callcontrol section 301 controls the oscillation frequency of the vibrator40, as illustrated in FIG. 12, to be increased as the amount of temporalchange becomes great. This makes it possible to execute properincoming-call control depending on a degree of the contacting state.

<Operation>

Next, operations of the portable terminal device 1 will be describedaccording to the third embodiment. FIG. 13 is a flowchart illustratingan example of a control procedure of the portable terminal device 1according to the third embodiment.

Steps S301 to S304 illustrated in FIG. 13 are the same as S101 to S104illustrated in FIG. 8, whose description is omitted.

At Step S305, the incoming-call control section 301 executesincoming-call control depending on the amount of temporal change of thespectrum obtained from the spectrum-change calculating section 102. Forexample, the incoming-call control section 301 increases the oscillationfrequency of the vibrator 40 and/or the amount of amplification of theringtone greater as the amount of temporal change becomes greater (seeFIG. 12).

Thus, it is possible to execute proper incoming-call control dependingon a degree of the contacting state.

Modified Example

Also, it is possible to have a computer execute the control processingdescribed in the first to third embodiments above by recording a programimplementing the control processing according to the embodiments abovein a recording medium.

Also, it is possible to implement the above control processing byrecording the program on a recording medium and having a computer or aportable terminal device read the recording medium on which the programis recorded. Here, various types of recording media can be usedincluding a recording medium that records information optically,electrically, or magnetically such as a CD-ROM, a flexible disk, anoptical magnetic disk and the like, and a semi-conductor memory and thelike that records information electrically such as a ROM, a flashmemory, and the like.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiments of the presentinvention have been described in detail, it should be understood thatthe various changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

What is claimed is:
 1. A portable terminal device comprising: a vibratorconfigured to vibrate a housing; an analysis section configured toexecute frequency analysis on an input sound from a microphone; acalculating section configured to calculate an amount of temporal changeof a spectrum obtained by the analysis section for the input sound whenthe housing vibrates; and a control section configured to executeincoming-call control depending on the amount of temporal changecalculated by the calculating section.
 2. The portable terminal deviceas claimed in claim 1, wherein the calculating section calculates theamount of temporal change of the spectrum within a predetermined band.3. The portable terminal device as claimed in claim 2, furthercomprising: an estimate section configured to estimate a noise spectrumfrom a spectrum of the input sound when vibration stops; wherein thecalculating section sets the predetermined band to a band where thenoise spectrum estimated by the estimate section is smaller than a firstthreshold value.
 4. The portable terminal device as claimed in claim 2,further comprising: an estimate section configured to estimate a noisespectrum from a spectrum of the input sound when vibration stops;wherein the calculating section calculates the amount of change within aband set by comparing the noise spectrum estimated by the estimatesection and a spectrum when vibration takes place.
 5. The portableterminal device as claimed in claim 1, wherein the calculating sectioncalculates an amount of change by accumulating the amount of change at aplurality of times.
 6. The portable terminal device as claimed in claim1, wherein the control section calculates the amount of change within aband corresponding to an oscillation frequency of the vibrator, and/orwithin a band corresponding to a harmonic of the oscillation frequency.7. The portable terminal device as claimed in claim 1, wherein thecontrol section increases volume of a ringtone or an oscillationfrequency of the vibrator based on the amount of temporal changecalculated by the calculating section.
 8. The portable terminal deviceas claimed in claim 1, further comprising: an output section configuredto output a command for vibrating the vibrator to the control sectionbased on a received light signal from an optical sensor.
 9. A method ofcontrolling a portable terminal device, comprising: executing frequencyanalysis on an input sound from a microphone when a housing is vibratedby a vibrator; calculating an amount of temporal change of a spectrumobtained as a result of the frequency analysis; and executingincoming-call control depending on the calculated amount of temporalchange.